<?php

function getglobal($key, $group = null) {
    global $config;
    $key = explode('/', $group === null ? $key : $group.'/'.$key);
    $v = &$config;
    foreach ($key as $k) {
        if (!isset($v[$k])) {
            return null;
        }
        $v = &$v[$k];
    }
    return $v;
}

//$this->_smarty->caching = C('cache=>viewCacheOn');
//$this->_smarty->template_dir = MODULES_PATH.'/Views';
//$this->_smarty->compile_dir = CACHE_PATH;
//$this->_smarty->cache_dir = CACHE_PATH;
//$this->_smarty->left_delimiter = C('view=>leftDelimiter');
//$this->_smarty->right_delimiter = C('view=>rightDelimiter');


function strexists($haystack, $needle) {
    return !(strpos($haystack, $needle) === FALSE);
}